﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.DialogUI {
    import flash.events.*;
    import flash.utils.*;
    import org.aswing.*;
    import Display.aswingui.*;

    public class CustomDialogView extends GenericDialogView {

        protected const BUTTON_SPACING:int = 15;

        protected var m_buttonInfo:Array;

        public function CustomDialogView(_arg1:Dictionary, _arg2:String="", _arg3:String="", _arg4:String="", _arg5:int=0, _arg6:Array=null){
            this.m_buttonInfo = _arg6;
            super(_arg1, _arg2, _arg3, TYPE_OK, null, _arg4, _arg5, "", null, "");
        }
        override protected function createButtonPanel():JPanel{
            var _local2:Object;
            var _local3:CustomButton;
            var _local1:JPanel = ASwingHelper.makeSoftBoxJPanel(SoftBoxLayout.CENTER);
            _local1.append(ASwingHelper.horizontalStrut(this.BUTTON_SPACING));
            for each (_local2 in this.m_buttonInfo) {
                _local3 = new CustomButton(_local2.label, null, "GreenButtonUI");
                _local3.addEventListener(MouseEvent.CLICK, _local2.callback, false, 0, true);
                _local1.appendAll(_local3, ASwingHelper.horizontalStrut(this.BUTTON_SPACING));
            };
            return (_local1);
        }

    }
}//package Display.DialogUI 
